package com.sparrow.common.ai.fsm;


public class IdleState implements State<TestStateMachinePlayer> {
    @Override
    public void enter(StateMachineContext<TestStateMachinePlayer> ctx) {
        System.out.println(ctx.getOwner().getName() + " 进入空闲状态");
        ctx.put("idleStartTime", System.currentTimeMillis());
    }

    @Override
    public void update(StateMachineContext<TestStateMachinePlayer> ctx) {
        String say = ctx.get("idleSay", String.class);
        System.out.println("空闲说：" + say);
    }

    @Override
    public void exit(StateMachineContext<TestStateMachinePlayer> ctx) {
        System.out.println(ctx.getOwner().getName() + " 退出空闲状态");
    }
}



